package c.x.jy.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import c.x.jy.common.utils.PageUtils;
import  c.x.jy.dao.entity.SysUserEntity;
import c.x.jy.service.entity.form.LoginForm;

import java.util.Map;

/**
 * 系统用户
 *
 * @author amwhyh
 * @email xxx@xx.com
 * @date 2021-05-20 20:20:23
 */
public interface SysUserService extends IService<SysUserEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 设置新密码
     * @param userId
     * @param oldPassWord
     * @param newPassWord
     * @return
     */

	int SetPassword(Long userId, String oldPassWord, String newPassWord);
	
	/**
	 * 缓存查找用户
	 * @param userid
	 * @return
	 */
	SysUserEntity selectCacheById(Long userid);
	/**
	 * 用户名查找用户
	 * @param username
	 * @return
	 */
	SysUserEntity queryByUserName(String username);
	/**
	 * 重置密码
	 * @param userId
	 * @return
	 */
	int restPassword(Long userId);
	/**
	 * 手机号查找用户
	 * @param phone
	 * @return
	 */
	SysUserEntity queryByMobile(String phone);
	/**
	 * 
	 * @param form
	 * @return
	 */
	long login(LoginForm form);
}


